import request from "@/utils/request";


export default {
  getList(page,size,condition) {
    console.log(condition)
    return request({
      url:`/room/list?num=${page}&size=${size}`,
      method: 'post',
      data:condition
    })
},
  getImgs(id){
    return request({
      url:`/room/getImgs/${id}`,
      method: 'get',
    })
  },

  delImg(imgId){
    return request({
      url: `/roomImg/del/${imgId}`,
      method: 'delete'
    })

  },
  getQuarters(){
    return request({
      url:'/quarters/getAll',
      method: 'get'
    })

  },
  getOwners(){
    return request({
      url: '/owner/getAll',
      method:'get'
    })
  },
  addRoom(RoomForm){
    return request({
      url:'/room/add',
      method: 'post',
      data:RoomForm
    })
  },
  edit(room){
    return request({
      url:'/room/edit',
      method: 'put',
      data:room
    })
  },
  editInfo(room){
    return request({
      url:'/room/editInfo',
      method: 'put',
      data:room
    })
  },
  getRoom(id){
    return request({
      url:`/room/getById/${id}`,
      method: 'get'
    })
  },
  getRoomOrder(num,size,name){
    return request({
      url:`/orderRoom/list?num=${num}&size=${size}&name=${name}`,
      method: 'get'
    })
  }


}
